<?php $activity = $data;
// 	$activity = new ActivityBean();
?>

<div id='table_wrap'>
	<div class="page_title">“拔尖计划”师生活动情况表</div>
	<div id="form_wrap">
	<form id="table_form" name="activity_form"
		action="<?php echo urlToAction("activity","requestactivity"); ?>">
		<input type="hidden" name="id" value="<?php echo $activity->id;?>"/>
		<div id="line1" class="line clearfix">
			<div id="activityType" style="float:left;margin-left:5px"><div class="field_name">活动类型：</div>
				<select name='activityType' class='select_style' id="activity_type_select"
							onchange='activityTypeChanged()'>
				<?php foreach(getActivityTypes() as $key => $value):?>
				<option value='<?php echo $key;?>'<?php if($key==$activity->activityType) echo 'selected="selected"' ;?>  ><?php echo $value;?></option>
				<?php endforeach;?>
				</select>
			</div>
			
			<div id="activitySubType" style="float:left;margin-left:54px">
				<div class="field_name">子&nbsp;&nbsp;类&nbsp;&nbsp;型：</div>
				<select name='type' class='select_style' id="activity_subtype_select">
				<?php $subType=getactivitySubTypes(); foreach($subType[$activity->activityType] as $key => $value):?>
				<option value='<?php echo $key;?>' <?php if($key==$activity->type) echo 'selected="selected"' ;?>  ><?php echo $value;?></option>
				<?php endforeach;?>
				</select>
			</div>
		</div>
		<div style="display: none">
			<select id="extra_select_1">
				<?php foreach($subType[1] as $key => $value):?>
				<option value='<?php echo $key;?>'><?php echo $value;?></option>
				<?php endforeach;?>
			</select>
			<select id="extra_select_2">
				<?php foreach($subType[2] as $key => $value):?>
				<option value='<?php echo $key;?>'><?php echo $value;?></option>
				<?php endforeach;?>
			</select>
			<select id="extra_select_3">
				<?php foreach($subType[3] as $key => $value):?>
				<option value='<?php echo $key;?>'><?php echo $value;?></option>
				<?php endforeach;?>
			</select>
		</div>
		<div id="line2" class="line clearfix">
			<div id='department' style="float:left;margin-left:5px"><div class="field_name" >院&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;系：</div>
				<select name='department' class='select_style' id="department_select">
				<?php foreach(getInstitutes() as $key => $value):?>
				<option value='<?php echo $key;?>' <?php if($key==$activity->department) echo "selected='selected'"?> ><?php echo $value;?></option>
				<?php endforeach;?>
				</select>
			</div>
			<div id="activityName" style="float:left;margin-left:54px"><div class="field_name">活动名称：</div>
				<input type="text" name="name" value="<?php echo $activity->name;?>"/>
			</div>
		</div>
		
		<div id="line3" class="line clearfix">
			<div id="activityHost" style="float:left;margin-left:5px"><div class="field_name">主&nbsp;讲&nbsp;人：</div>
				<input type="text" name="host" value="<?php echo $activity->host;?>"/>
			</div>
			<div id="location" style="float:left;margin-left:54px">
				<div class="field_name">地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;点：</div>
				<input type="text" name="location" value="<?php echo $activity->location;?>"/>
			</div>
		</div>
		
		<div id="line4" class="line clearfix">
			<div id="activityTime" style="float:left;margin-left:5px"><div class="field_name">时&nbsp;间&nbsp;段：</div>
			<input type="text" name="activityBegin" size="20" value="<?php echo $activity->activityBegin;?>" class="hasdatepicker" id="begin_date" class="hasdatepicker">
			</div>
			
			<div style="float:left;margin-left:50px"><div class="field_name">至：</div>
				<input type="text" name="activityEnd" size="20" value="<?php echo $activity->activityEnd;?>" id="end_date"  class="hasdatepicker">
			</div>
			
		</div>
		
		<div id="line5" class="line clearfix">
			<div id="activityContent" style="float:left;margin-left:5px"><div class="field_name">内容简介：</div>
				<textarea id="content_area" name="content"><?php echo $activity->content;?></textarea>
			</div>
		</div>
		
		<div id="line6" class="line clearfix">
			<div id="activityBudget" style="float:left;margin-left:5px"><div class="field_name">经费预算：</div>
				<textarea id="budget_area" name="budget"><?php echo $activity->budget;?></textarea>
			</div>
		</div>
		<div id="line7" class="line clearfix">
			<div id="time" style="float:left;margin-left:5px"><div class="field_name">填表日期：</div>
				<input type="text" name="time" value="<?php echo $activity->time;?>" class="hasdatepicker"/>
			</div>
		</div>
		
		<div class="operator clearfix">
			<div class="form_post button">提交</div>
		</div>
		
	</form>
	</div>
</div>
